package tk.mystudio.idc.pojo;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

@Entity
@Table(name = "updateinfo")
public class UpdateInfo implements Serializable {

	private static final long serialVersionUID = 6804090334029672226L;

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name = "id")
	private Integer id;

	/**
	 * 更新的idc业务的id
	 */
	@Column(name = "update_user_id")
	private Integer updateUserId;

	/**
	 * 更新者id
	 */
	@Column(name = "idc_business_id")
	private Integer idcBusinessId;
	
	/**
	 * 更新的字段
	 */
	@Column(name= "updated_column")
	private String updatedColumn;
	
	/**
	 * 更新字段的描述
	 */
	@Column(name = "updated_column_name")
	private String updatedColumnName;

	/**
	 * 更新前的值
	 */
	@Column(name = "old_value")
	private String oldValue;

	/**
	 * 更新后的值
	 */
	@Column(name = "new_value")
	private String newValue;

	/**
	 * 更新日期
	 */
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "update_date")
	private Date updateDate;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Integer getUpdateUserId() {
		return updateUserId;
	}

	public void setUpdateUserId(Integer updateUserId) {
		this.updateUserId = updateUserId;
	}

	public Integer getIdcBusinessId() {
		return idcBusinessId;
	}

	public void setIdcBusinessId(Integer idcBusinessId) {
		this.idcBusinessId = idcBusinessId;
	}

	public String getUpdatedColumnName() {
		return updatedColumnName;
	}

	public void setUpdatedColumnName(String updatedColumnName) {
		this.updatedColumnName = updatedColumnName;
	}

	public String getOldValue() {
		return oldValue;
	}

	public void setOldValue(String oldValue) {
		this.oldValue = oldValue;
	}

	public String getNewValue() {
		return newValue;
	}

	public void setNewValue(String newValue) {
		this.newValue = newValue;
	}

	public Date getUpdateDate() {
		return updateDate;
	}

	public void setUpdateDate(Date updateDate) {
		this.updateDate = updateDate;
	}

	public String getUpdatedColumn() {
		return updatedColumn;
	}

	public void setUpdatedColumn(String updatedColumn) {
		this.updatedColumn = updatedColumn;
	}

	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		builder.append("UpdateInfo [id=");
		builder.append(id);
		builder.append(", idcBusinessId=");
		builder.append(idcBusinessId);
		builder.append(", newValue=");
		builder.append(newValue);
		builder.append(", oldValue=");
		builder.append(oldValue);
		builder.append(", updateDate=");
		builder.append(updateDate);
		builder.append(", updateUserId=");
		builder.append(updateUserId);
		builder.append(", updatedColumn=");
		builder.append(updatedColumn);
		builder.append(", updatedColumnName=");
		builder.append(updatedColumnName);
		builder.append("]");
		return builder.toString();
	}

}
